package com.mediacloud.app.newsmodule.fragment.imagetext.room

import androidx.room.*

@Dao
interface CacheDao {
    @Insert
    fun insertData(cacheData: CacheData)

    @Delete
    fun deleteData(cacheData: CacheData)

    @Query("DELETE  FROM cache_data")
    fun deleteAllChannel()

    @Query("SELECT * FROM cache_data")
    fun getCacheDataList(): MutableList<CacheData>

    @Query("SELECT * FROM cache_data  WHERE id = :id")
    fun getCacheData(id: Long): CacheData

    @Query("UPDATE cache_data SET data = :data WHERE id = :id")
    fun updateChannelName(id: Long, data: String)
}